<template>
  <div class="mod-config">
    <table-view ref="view"
                :searchAttrs="searchAttrs"
                :primaryKey="primaryKey"
                :listApiName="listApiName"
                :deleteApiName="deleteApiName"
                :saveAuthName="saveAuthName"
                :deleteAuthName="deleteAuthName"
                :showAttrs="showAttrs"
    >
    </table-view>
    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  </div>


</template>

<script>
  import AddOrUpdate from './deepproductinfo-add-or-update'

  import tableView from '@/components/tableView'
  import basicMixins from '@/utils/commonViewMixins'
  export default {
    mixins: [basicMixins],
    data () {
      return {
        searchAttrs: {
          deepProductNo: {
            placeholder: '请输入产品名称'
          }
        },
        primaryKey: 'id',
        listApiName: 'deepApi/listDeepProductInfoList',
        deleteApiName: 'deepApi/deleteDeepProductInfo',
        saveAuthName: 'deep:deepproductinfo:save',
        deleteAuthName: 'deep:deepproductinfo:delete',
        showAttrs:{
          deepProductNo:{
            label: '产品编号',
            width:200
          },
          deepType:{
            label: '加工方式',
            width:250
          },
          colorNo:{
            label: '色号'
          },
          productImage: {label: '图片', type: 'image'},
          remark:{
            label: '备注'
          },
          status: {
            label: '状态',
            type: 'radio',
            items: [
              {value: 0, text: '禁用', tagType: 'danger'},
              {value: 1, text: '正常'}
            ]
          }
        }
      }
    },
    components: {
      AddOrUpdate,
      tableView
    }
  }
</script>
